using System;

using Impact.Views;
using Impact.Model.Objects;
using Impact.Infrastructure.Exceptions;

namespace Impact.Web
{
    /// <summary>
    /// code-behind for the default master page
    /// </summary>
    public partial class DefaultMaster : System.Web.UI.MasterPage, IImpactMasterPage
    {

        /// <summary>
        /// Loads the template into the objects that need it
        /// </summary>
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
        }

        /// <summary>
        /// Gets or Sets the template that this master page uses
        /// </summary>
        public Template Template
        {
            get { return template; }
            set { template = value; }
        }
        private Template template;


        #region IImpactMasterPage Members

        /// <summary>
        /// Sets a template as the master page's datasource
        /// </summary>
        public object DataSource
        {
            set { template = (Template)value; }
        }

        #endregion
    }
}
